package top.songxs.yygh.hosp.controller;

import org.springframework.web.bind.annotation.*;
import top.songxs.yygh.common.result.R;

import java.util.Arrays;

@RestController

@RequestMapping("/admin/hosp")
public class UserLoginController {
    @PostMapping("/user/login")
    public R login() {
        return R.ok().data("token", "admin-token");
    }

    @GetMapping("/user/info")
    public R info() {


        //{code: 20000, data: {roles: ["admin"], introduction: "I am a super administrator",…}}

        return R.ok()
                .data("roles", Arrays.asList("admin"))
                .data("introduction", "我是尚医通后台管理员")
                .data("avatar", "https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif")
                .data("name", "尚医通管理员");
    }

}





















